var model = {
  // 不用字段
  // "condition[用户ID]": "",
  // "uuid[用户ID]": 0,
  // "ecSalesAfterState[平台售后状态]": 0,
  // "logisticsNo[拆包物流单号]": "",
  // "shopOrderNo[店铺订单号]": "",
  // "orderNo[系统订单号]": "",
  // "outboundNo[销售出库单号]": "",
  // "salesAfterOrderState[售后单状态]": 0,
  
  // 需要核对的数据来源的字段

  
  "goodsDTOList[商品list]": [
    {
      // 需要核对的数据来源的字段，商品选择弹窗没有这些字段
      "defectiveUniqueCodes[次品商品唯一码集合]": [],
      "normalUniqueCodes[正品商品唯一码集合]": [],
      "unpackingNum[拆包数量]": 0,
      "storeId[供应商ID]": 0,
      "storeName[供应商名称]": "",
      
      "goodsId[供应商商品id]": 0,
      "goodsImage[供应商商品图片]": "",
      "goodsName[供应商商品名称]": "",
      "goodsSpec[供应商颜色规格]": "",
      "skuCode[商品编码]": "",
      "skuId[skuId]": 0,
      "spuCode[款式编码]": "",
      
      "defectiveNum[商品数量]": 0,
      "sysGoodsId[系统商品id]": 0,
      "sysGoodsImage[系统商品图片]": "",
      "sysGoodsName[系统商品名称]": "",
      "sysGoodsSpec[系统颜色规格]": "",
      "sysPrice[系统商品单价(冗余)]": "",
      "sysSkuCode[商品编码]": "",
      "sysSpuCode[款式编码]": "",


      "uuid[用户ID]": 0,
    }
  ],

  // 已知来源 字段
  "remark[退货备注]": "",
  "salesAfterOrderId[售后单id]": 0,
  "salesAfterOrderNo[售后单单号]": "",
  "salesAfterType[售后类型]": 0,
  "shopName[店铺名称]": "",
}


function conver (data) {
  var typeMap = {
    string: '',
    array: [],
    integer: 0,
  }
  var obj = {}
  Object.keys(data).forEach(key => {
    const firstItem = data[key]
    const firstKey = key + `[${(firstItem.description || '未知描述')}]`
    obj[firstKey] = getType(firstItem.type)
    
    if (firstItem.type === 'array' && firstItem.items) {
      const obj2 = {}
      Object.keys(firstItem.items).forEach(k2 => {
        const sectionItem = firstItem.items[k2]
        const k22 = k2 + `[${(sectionItem.description || '未知描述')}]`
        obj2[k22] = getType(sectionItem.type)
      })
      obj[firstKey].push(obj2)
    }
  })
  
  function getType (type) {
    try {
      return JSON.parse(JSON.stringify(typeMap[type]))
    } catch (error) {
      return typeMap[type] 
    }
  }
}